package com.wendy.mapper;

import com.wendy.MyMapper;
import com.wendy.model.Authority;

import java.util.List;

/**
 * @author zhuwending
 */
public interface AuthorityMapper extends MyMapper<Authority> {

    /**
     * 根据资源查询权限
     *
     * @param uri 资源
     * @return 权限集合
     */
    List<Authority> selectAuthorityByResourceUri(String uri);

    /**
     * 根据用户id查询权限
     *
     * @param userId 用户id
     * @return 权限列表
     */
    List<Authority> selectAuthorityByUserId(Long userId);
}
